草庐IT

HTTP 404 重定向

全部标签

javascript - 使用 http.get node.js 的 promise

我正在做nodeschool练习,Thisproblemisthesameasthepreviousproblem(HTTPCOLLECT)inthatyouneedtousehttp.get().However,thistimeyouwillbeprovidedwiththreeURLsasthefirstthreecommand-linearguments.YoumustcollectthecompletecontentprovidedtoyoubyeachoftheURLsandprintittotheconsole(stdout).Youdon'tneedtoprintoutt

javascript - angular2-in-memory-web-api 404 错误

我正在尝试按照本指南以Angular2构建5分钟的应用程序:https://angular.io/docs/ts/latest/tutorial/toh-pt6.html.在http部分,我添加了一个假服务器,但我收到404错误,因为angular2-in-memory-web-api.http://localhost:4200/vendor/angular2-in-memory-web-api/in-memory-backend.service.jsFailedtoloadresource:theserverrespondedwithastatusof404(NotFound)我试图

javascript - 强制定向图错误, "Cannot Read Property ' Push' of Undefined"

我是编码新手,最近开始使用d3生成力导向图。使用链接派生节点时,我成功生成了一个四节点图。但是,当我明确列出节点时,我收到错误“UncaughtTypeError:Cannotreadproperty'push'ofundefined(d3.v3.min.js)”。我研究了对以下两个类似问题的回答,但无法使用答案解决此问题。我试图尽可能多地删除不相关的功能,谢谢。JavaScripterror"UncaughtTypeError:Cannotcallmethod'push'ofundefined"D3.jsUncaughtTypeError:Cannotcallmethod'push'

javascript - 如何让 Mercury Editor 重定向到新资源?

看完RailsCast#296aboutMercuryEditor,我正在尝试让编辑器重定向到新创建的资源。我已经可以使用JS和window.location.href=在客户端重定向。但是对于一个新资源,我无法在客户端“猜测”它的URL。我需要它在服务器响应中。但是,问题是我看不到在编辑器中使用服务器响应的可能性。无论Controller呈现什么,服务器响应都是discarded由Mercury而不是用作我的mercury:saved函数的参数。有办法解决这个问题吗? 最佳答案 我能够通过发回有效的JSON字符串在更新时执行此操作

javascript -/undefined 多次出现在我的 404 错误日志中

基本上在我的错误日志中我看到了很多:mysite.com/undefined(withreferercomingfromrandompagesofthewebsite)User-Agent:Mozilla/5.0(WindowsNT6.0)AppleWebKit/537.1(KHTML,likeGecko)Chrome/21.0.1180.89Safari/537.1(和其他一些用户代理)当然,我已经检查了HTML或DOM以查找带有/undefined或类似内容的链接,但什么也没有。我已经使用开发人员工具检查了网络选项卡,在这些页面上没有任何请求/undefined(使用我的chrom

javascript - Angularjs 的 $http.get 在 IE11 中只执行一次

我正在学习angularjs,作为一个测试项目,我正在轮询一个服务器,该服务器返回一个事件进程列表(它们的pids)并显示这些。客户端代码如下所示:functionProcessCtrl($scope,$http,$interval){$scope.ReloadData=function(){varresult=$http.get("processdata",{timeout:1000});result.success(function(data,status,headers,config){$scope.processes=data;});}$scope.ReloadData();v

javascript - AngularJS:使用超时属性取消 $http 请求

我看过很多关于这个主题的帖子和很多网络文章,但我仍然被我的问题难住了。我找到了thispost非常有用,但我的timeoutRequest()函数从未被调用。我正在使用超时属性为$http的promise,但基础HTTP请求未被取消。我认为promise本身正在解决,但请求并未取消。我的Controller行为如下所示:$scope.enquiriesSelected=function(){$scope.cancelHttpRequests();$location.path("/enquiries");};$scope.cancelHttpRequests=function(){con

javascript - AngularJS http 返回值

我想在AngularJS中编写一个返回值(实际上它是一个字符串)的函数。该值由http请求返回,但异步让我抓狂。我的第一次尝试是:this.readParameter=function(key){$http({method:"GET",url:"XXXXXXX",headers:{'Content-Type':'application/json'}}).then(functionsuccessCallback(response){returnresponse.data;},functionerrorCallback(response){thrownewError("Error");})

[k8s] error: Readiness probe failed: HTTP probe failed with statuscode: 503

k8sissue: error:Readinessprobefailed:HTTPprobefailedwithstatuscode:503explanation:Kubernetes为准备和活动探测返回HTTP503错误的事实意味着到后端的连接可能有问题。有趣的是,这不是重点。这些探针不是用来执行HTTP流的端到端测试的。探测只用于验证它们所监视的服务是否响应。简单地说,好的是自己设置的readiness探针(probe)起作用了,不好的是,自己的配置文件可能有一些其他方面的问题。具体是什么方面的问题呢?就是创建出来的container里的报错信息Read-onlyfilesystem/xx

javascript - 在 http.get 之后从另一个 Controller 更新一个 Controller 中变量的值?

我有两个Controller。我想使用服务将变量从一个Controller更新到另一个Controller,但它没有更新。我希望Controller“select”中的变量$scope.names在Controller“current”中更新并显示它app.controller('select',['$scope','$http','myService',function($scope,$http,myService){$http.get('/myapp/stocknames').success(function(data){$scope.names=data;myService.na